package movee.os;

/**
 * 与线程关联的数据内容
 *
 * @author movee
 */
public class ThreadContext {

    private static final ThreadLocal<Boolean> INSTANT_BACKUP_CONTEXT = new ThreadLocal<>();

    private ThreadContext() {
        // private constructor to prevent instantiation
    }
    public static Boolean getInstantBackupContext() {
        return INSTANT_BACKUP_CONTEXT.get();
    }

    public static void setInstantBackupContext(Boolean value) {
        INSTANT_BACKUP_CONTEXT.set(value);
    }

    public static void clearInstantBackupContext() {
        INSTANT_BACKUP_CONTEXT.remove();
    }

}
